Default Video Player State
Implementation of VideoPlayerState for WebAssembly/JavaScript platform. Manages the state of a video player including playback controls, media information, and error handling.
Properties
Callback to apply playback speed changes to the underlying media player
Callback to apply volume changes to the underlying media player
Returns the total duration of the video as a formatted string.
Callback invoked when playback reaches the end of the media. Only called when loop is false. May be invoked from a background thread.
Callback function to force recalculation of the HTML view position. This is set by the VideoPlayerSurface when the HTML view is created.
Returns the current playback position as a formatted string.
Denotes whether the user is manually adjusting the playback position.
Functions
Clears the shared video cache, removing all cached media data from disk.
Clears any error state.
Disables subtitles by clearing the current track and setting subtitlesEnabled to false.
Forces recalculation of the HTML view position. This is useful when the layout changes and the HTML view needs to be repositioned.
Callback for time update events from the media player.
Opens a media file bundled with the application.
Opens a media file.
Opens a media source from the given URI.
Commits the seek after a user-driven seek interaction. Performs the actual seek on the player and ends the dragging state.
Begins a user-driven seek interaction (e.g. slider drag). Updates the visual slider position without performing the actual seek on the player. Must be followed by seekFinished to commit the seek.
Selects a subtitle track and enables subtitles.
Sets the error state.
Toggles the fullscreen state of the video player
Updates the position and duration display.